Function at 0x100043d0
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x1000ea8b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x58
push ebx
push esi
mov esi, dword [esp + 0x74]
xor edx, edx
mov ebx, ecx
cmp esi, edx
push edi
mov dword [esp + 0xc], ebx
je 0x100047d8
mov edi, dword [esp + 0x7c]
cmp edi, 6
jb 0x100047d8
xor eax, eax
push ebp
mov ax, word [esi + 2]
dec eax
jne 0x100047c1
xor eax, eax
mov ax, word [esi + 4]
dec eax
je 0x10004742
dec eax
je 0x100045b7
dec eax
je 0x1000444e
mov word [esp + 0x24], 0x4000
mov word [esp + 0x26], 1
mov word [esp + 0x28], dx
mov word [esp + 0x2a], dx
jmp 0x100047b3
cmp word [ebx + 0xc98], dx
je 0x10004574
cmp edi, 0x20
jb 0x10004574
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x1c]
lea ebp, [edx + ecx]
lea ebp, [eax + ebp + 0x20]
cmp ebp, edi
ja 0x10004574
mov ebp, dword [esi + 8]
add ebp, edx
cmp ebp, edi
ja 0x10004574
mov ebp, dword [esi + 0x10]
lea ebx, [ecx + ebp]
cmp ebx, edi
ja 0x10004570
mov ebx, dword [esi + 0x18]
add ebx, eax
cmp ebx, edi
ja 0x10004570
mov edi, dword [esi + 8]
add ebp, esi
shr edx, 1
add edi, esi
dec edx
mov ebx, edx
mov edx, dword [esi + 0x18]
shr ecx, 1
shr eax, 1
dec ecx
add esi, edx
dec eax
cmp word [edi + ebx*2], 0
mov dword [esp + 0x80], ecx
mov dword [esp + 0x7c], eax
jne 0x10004570
cmp word [ebp + ecx*2], 0
jne 0x10004570
cmp word [esi + eax*2], 0
jne 0x10004570
push 0x38
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov dword [esp + 0x70], 0
je 0x10004527
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x80]
push ecx
mov ecx, dword [esp + 0x14]
push esi
push edx
push ebp
push ebx
lea edx, [ecx + 0xc98]
push edi
push edx
mov ecx, eax
call fcn.10003ba0
jmp 0x10004529
xor eax, eax
test eax, eax
mov dword [esp + 0x70], 0xffffffff
je 0x10004570
mov edx, dword [esp + 0x10]
lea ecx, [edx + 0x2c98]
cmp eax, ecx
je 0x100047c1
mov dword [eax + 8], ecx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 4]
pop ebp
pop edi
mov dword [edx + 8], eax
mov dword [ecx + 4], eax
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
add esp, 0x64
ret 0xc
mov ebx, dword [esp + 0x10]
mov ecx, 9
mov esi, str.Invalid_parameter
lea edi, [esp + 0x34]
mov word [esp + 0x24], 0x4000
mov word [esp + 0x26], 1
mov word [esp + 0x28], 3
mov word [esp + 0x2a], 0
mov dword [esp + 0x2c], 0x10
mov dword [esp + 0x30], 0x24
push 0x34
rep movsd dword es:[edi], dword [esi]
jmp 0x100047b5
cmp word [ebx + 0xc98], dx
lea ebp, [ebx + 0xc98]
mov dword [esp + 0x7c], edx
jne 0x100046f6
cmp edi, 0x10
jb 0x100046fe
mov ecx, dword [esi + 0xc]
lea eax, [ecx + 0x10]
cmp eax, edi
ja 0x100046fe
xor edi, edi
xor eax, eax
cmp ecx, edx
jbe 0x100045fa
xor edx, edx
mov dl, byte [esi + eax + 0x10]
add edi, edx
inc eax
cmp eax, ecx
jb 0x100045ed
cmp dword [esi + 8], edi
jne 0x100046fe
mov ecx, ebx
call fcn.10004140
test eax, eax
je 0x100046fe
mov ebx, dword [esi + 0xc]
add esi, 0x10
test ebp, ebp
mov dword [esp + 0x14], esi
mov dword [esp + 0x80], 1
je 0x100046ea
test esi, esi
je 0x100046ea
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 3
push 0
push 0
push 0x40000000
push ebp
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x10004674
lea ecx, [esp + 0x20]
xor eax, eax
push 2
push ecx
push eax
push esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x10004690
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push ebp
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x100046ea
xor edi, edi
test ebx, ebx
jbe 0x100046ca
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
mov eax, ebx
push 0
push edx
sub eax, edi
lea edx, [edi + ecx]
push eax
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100046bf
add edi, dword [esp + 0x18]
cmp edi, ebx
jb 0x10004696
jmp 0x100046ca
mov dword [esp + 0x80], 0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x80]
test eax, eax
je 0x100046ea
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x7c], 1
jmp 0x100046fe
mov ebx, dword [esp + 0x10]
mov word [ebp], 0
jmp 0x100046fe
mov dword [esp + 0x7c], 1
mov ax, word [esp + 0x7c]
lea ecx, [esp + 0x24]
push 8
push ecx
mov ecx, ebx
mov word [esp + 0x2c], 0x4000
mov word [esp + 0x2e], 1
mov word [esp + 0x30], 2
mov word [esp + 0x32], ax
call fcn.1000e330
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
add esp, 0x64
ret 0xc
cmp word [ebx + 0xc98], dx
jne 0x10004798
mov ecx, ebx
call fcn.100041b0
neg eax
sbb eax, eax
mov ecx, 1
lea edx, [esp + 0x24]
mov word [esp + 0x26], cx
neg eax
mov word [esp + 0x28], cx
push 8
push edx
mov ecx, ebx
mov word [esp + 0x2c], 0x4000
mov word [esp + 0x32], ax
call fcn.1000e330
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
add esp, 0x64
ret 0xc
mov eax, 1
mov word [esp + 0x24], 0x4000
mov word [esp + 0x26], ax
mov word [esp + 0x28], ax
mov word [esp + 0x2a], ax
push 8
lea eax, [esp + 0x28]
mov ecx, ebx
push eax
call fcn.1000e330
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
add esp, 0x64
ret 0xc
mov ecx, dword [esp + 0x64]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x64
ret 0xc