Function at 0x10003f90
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x44
xor eax, eax
push ebx
push ebp
mov dword [esp + 0x34], eax
push esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
push edi
mov edi, dword [esp + 0x58]
mov eax, edi
and eax, 0x200
mov dword [esp + 0x20], eax
xor ebx, ebx
neg eax
sbb eax, eax
and eax, 0xffffff9c
mov ebp, edx
add eax, 0xdc
mov edx, edi
mov esi, ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x10], 0x3103
mov word [esp + 0x3e], ax
call fcn.100028e0
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0x50]
test eax, 0x8000
je 0x10004045
lea edx, [esp + 0x28]
xor ecx, ecx
call fcn.1000b2d0
mov eax, dword [esp + 0x28]
mov ecx, dword [esi + 0x30]
sub ecx, dword [esi + 0x28]
mov ebx, dword [sym.imp.KERNEL32.dll_MulDiv]
push eax
push 0x5a0
push ecx
call ebx
mov edx, dword [esp + 0x2c]
mov word [esp + 0x48], ax
mov eax, dword [esi + 0x34]
sub eax, dword [esi + 0x2c]
push edx
push 0x5a0
push eax
call ebx
mov word [esp + 0x4a], ax
xor ebx, ebx
jmp 0x1000405e
test eax, 0x4000
je 0x1000405e
mov cx, word [esi + 0x38]
mov dx, word [esi + 0x3c]
mov word [esp + 0x44], cx
mov word [esp + 0x46], dx
cmp dword [esi + 0x5c], ebx
je 0x10004347
test edi, 0x100
jne 0x10004347
cmp word [esi + 0xac], bx
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [esi + 0xac]
mov dword [esp + 0x24], eax
je 0x100040a8
push 0
push 0
push 4
lea ecx, [esp + 0x5c]
push ecx
push 0xffffffffffffffff
push eax
push 0
push 0
call ebx
test eax, eax
jne 0x100040a8
mov byte [esp + 0x50], al
mov eax, dword [esi + 0x5c]
mov edx, dword [0x1001bf40]
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
add eax, eax
mov dword [esp + 0x34], eax
add eax, 2
push eax
push 8
push edx
call edi
test eax, eax
mov dword [esp + 0x1c], eax
je 0x100043b5
mov ecx, dword [esp + 0x34]
mov edx, dword [esi + 0x5c]
push 0
push 0
push ecx
push eax
mov eax, dword [esi + 0x58]
push edx
push eax
push 0
push 0
call ebx
test ax, ax
mov word [esp + 0x4c], ax
je 0x100043b5
mov eax, dword [esi + 0x64]
test eax, eax
je 0x10004134
mov ecx, dword [0x1001bf40]
add eax, eax
mov dword [esp + 0x34], eax
add eax, 2
push eax
push 8
push ecx
call edi
test eax, eax
mov dword [esp + 0x14], eax
je 0x100043b5
mov edx, dword [esp + 0x34]
mov ecx, dword [esi + 0x60]
push edx
mov edx, eax
call fcn.1000a4c0
mov word [esp + 0x4e], ax
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [esp + 0x5c]
push eax
push 0x18
lea ecx, [esp + 0x48]
push ecx
push ebp
call edi
test eax, eax
je 0x100043bd
cmp dword [esp + 0x58], 0x18
jne 0x100043bd
movsx eax, word [esp + 0x4c]
push 0
add eax, 1
lea edx, [esp + 0x5c]
push edx
push eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x28]
push eax
push ebp
call edi
test eax, eax
je 0x100043bd
mov ecx, dword [esp + 0x58]
cmp ecx, dword [esp + 0x34]
jne 0x100043bd
movsx eax, word [esp + 0x4e]
mov ecx, dword [esp + 0x14]
mov edx, eax
add eax, 1
test edx, edx
mov dword [esp + 0x34], eax
jne 0x100041aa
lea ecx, [esp + 0x18]
push 0
lea edx, [esp + 0x5c]
push edx
push eax
push ecx
push ebp
call edi
test eax, eax
je 0x100043bd
mov eax, dword [esp + 0x58]
cmp eax, dword [esp + 0x34]
jne 0x100043bd
cmp dword [esp + 0x20], 0
jne 0x100043bd
mov ecx, dword [esi + 0x5c]
push 0
lea eax, [esp + 0x5c]
push eax
lea edx, [ecx + ecx + 2]
mov ebx, 0xc
push ebx
lea ecx, [esp + 0x3c]
push ecx
push ebp
mov dword [esp + 0x44], 1
mov dword [esp + 0x48], edx
call edi
test eax, eax
je 0x100043bd
cmp dword [esp + 0x58], ebx
jne 0x100043bd
mov eax, dword [esp + 0x34]
mov ecx, dword [esi + 0x58]
push 0
lea edx, [esp + 0x5c]
push edx
push eax
push ecx
push ebp
call edi
test eax, eax
je 0x100043bd
mov edx, dword [esp + 0x58]
cmp edx, dword [esp + 0x34]
jne 0x100043bd
mov eax, dword [esi + 0x64]
test eax, eax
je 0x100042b0
push 0
lea ecx, [esp + 0x5c]
push ecx
push ebx
lea edx, [esp + 0x3c]
push edx
lea eax, [eax + eax + 2]
push ebp
mov dword [esp + 0x44], 2
mov dword [esp + 0x48], eax
call edi
test eax, eax
je 0x100043bd
cmp dword [esp + 0x58], ebx
jne 0x100043bd
mov ecx, dword [esp + 0x34]
push 0
lea eax, [esp + 0x5c]
push eax
push ecx
mov ecx, dword [esi + 0x60]
call fcn.1000a3f0
push eax
push ebp
call edi
mov ecx, dword [esi + 0x60]
mov ebx, eax
call fcn.1000a440
test ebx, ebx
je 0x100043bd
mov edx, dword [esp + 0x58]
cmp edx, dword [esp + 0x34]
jne 0x100043bd
mov ebx, 0xc
mov esi, dword [esp + 0x24]
cmp word [esi], 0
je 0x10004312
push 0
lea eax, [esp + 0x5c]
push eax
push ebx
lea ecx, [esp + 0x3c]
push ecx
push ebp
mov dword [esp + 0x44], 3
mov dword [esp + 0x48], 8
call edi
test eax, eax
je 0x100043bd
cmp dword [esp + 0x58], ebx
jne 0x100043bd
mov eax, dword [esp + 0x34]
push 0
lea edx, [esp + 0x5c]
push edx
push eax
push esi
push ebp
call edi
test eax, eax
je 0x100043bd
mov ecx, dword [esp + 0x58]
cmp ecx, dword [esp + 0x34]
jne 0x100043bd
xor eax, eax
push eax
lea edx, [esp + 0x5c]
push edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
push ebx
lea eax, [esp + 0x3c]
push eax
push ebp
call edi
test eax, eax
je 0x100043bd
cmp dword [esp + 0x58], ebx
jne 0x100043bd
mov dword [esp + 0x10], 0
jmp 0x100043bd
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea ecx, [esp + 0x5c]
push ecx
push 0x18
lea edx, [esp + 0x48]
push edx
push ebp
mov byte [esp + 0x64], 0x77
mov byte [esp + 0x65], 0x6d
mov byte [esp + 0x66], 0x66
call edi
test eax, eax
je 0x100043ea
cmp dword [esp + 0x58], 0x18
jne 0x100043ea
push ebx
lea eax, [esp + 0x5c]
push eax
push 2
lea ecx, [esp + 0x24]
push ecx
push ebp
call edi
test eax, eax
je 0x100043ea
cmp dword [esp + 0x58], 2
jne 0x100043ea
cmp dword [esi], ebx
je 0x100043a9
mov edx, ebp
mov ecx, esi
call fcn.1000a6a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret 4
mov dword [esp + 0x10], 0x3101
mov eax, dword [esp + 0x1c]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
je 0x100043d7
mov edx, dword [0x1001bf40]
push eax
push 0
push edx
call esi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x100043ea
push eax
mov eax, dword [0x1001bf40]
push 0
push eax
call esi
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret 4