Function at 0x10046040
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x534
mov eax, dword [0x1017455c]
xor eax, esp
mov dword [esp + 0x52c], eax
mov eax, dword [esp + 0x538]
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x207
mov esi, ecx
lea ecx, [esp + 0x25]
push ebx
push ecx
mov dword [esp + 0x28], eax
mov byte [esp + 0x2c], bl
call fcn.10116880
add esp, 0xc
push esi
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x20]
push 0x25
push eax
call fcn.1010d780
add esp, 8
test eax, eax
je 0x100460ad
push 1
lea ecx, [esp + 0x24]
push ecx
call sym.EncDec.dll_IsItEnvStringType
push 0x80
push 4
push 3
push 4
lea edi, [esp + 0x30]
call fcn.10033690
mov esi, eax
add esp, 0x10
mov dword [esp + 0x14], esi
cmp esi, 0xffffffff
jne 0x10046268
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
cmp eax, 0x20
jne 0x100461fb
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x100460e5
mov dx, word [0x101526a0]
push 0x80
push 4
mov word [edi], dx
push 3
push 4
lea edi, [esp + 0x30]
call fcn.10033690
mov esi, eax
add esp, 0x10
mov dword [esp + 0x14], esi
cmp esi, 0xffffffff
jne 0x10046268
call ebp
cmp eax, 0x20
jne 0x100461fb
mov eax, edi
dec eax
jmp 0x10046130
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x10046130
mov cx, word [0x101526a4]
mov dl, byte [0x101526a6]
push 0x80
push 4
push 3
mov word [eax], cx
push 4
lea edi, [esp + 0x30]
mov byte [eax + 2], dl
call fcn.10033690
mov esi, eax
add esp, 0x10
mov dword [esp + 0x14], esi
cmp esi, 0xffffffff
jne 0x10046268
call ebp
cmp eax, 0x20
jne 0x100461fb
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x10046180
mov eax, dword [0x10150054]
push 0x80
push 4
mov dword [edi], eax
push 3
push 4
lea edi, [esp + 0x30]
call fcn.10033690
mov esi, eax
add esp, 0x10
mov dword [esp + 0x14], esi
cmp esi, 0xffffffff
jne 0x10046268
call ebp
cmp eax, 0x20
jne 0x100461fb
mov eax, edi
dec eax
nop
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x100461c0
mov ecx, dword [0x101526a8]
mov dl, byte [0x101526ac]
push 0x80
push 4
push 3
mov dword [eax], ecx
push 4
lea edi, [esp + 0x30]
mov byte [eax + 4], dl
call fcn.10033690
mov esi, eax
add esp, 0x10
mov dword [esp + 0x14], esi
cmp esi, 0xffffffff
jne 0x10046268
push 0x207
lea eax, [esp + 0x335]
push ebx
push eax
mov byte [esp + 0x33c], bl
call fcn.10116880
push 0x103
lea ecx, [esp + 0x239]
push ebx
push ecx
mov byte [esp + 0x240], bl
call fcn.10116880
add esp, 0x18
call ebp
push 0x104
mov edi, eax
lea esi, [esp + 0x22c]
call fcn.10049ce0
mov edx, esi
push edx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x33c]
push str.Unable_to_open_file__s__Reason:__s
push ecx
call fcn.1010d6a8
add esp, 0x14
xor eax, eax
jmp 0x100462a0
push 2
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x10046292
mov eax, dword [esp + 0x54c]
mov ecx, dword [esp + 0x1c]
push ebx
lea edx, [esp + 0x1c]
push edx
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x14]
push edx
call fcn.100673f0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x53c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1010d699
add esp, 0x534
ret