Function at 0x414990
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x20
mov ax, word [0x46e1fc]
push ebx
push ebp
push esi
xor esi, esi
push edi
push esi
mov word [0x46e210], si
mov word [esp + 0x20], 0x14c
mov word [esp + 0x22], ax
call dword [sym.imp.MSVCRT.dll_time]
mov ecx, dword [0x46e1fc]
mov edx, dword [0x46e204]
and ecx, 0xffff
mov dword [esp + 0x24], eax
mov word [esp + 0x30], si
mov word [esp + 0x32], 0x100
lea eax, [edx + ecx*4 + 2]
lea ecx, [eax + eax*4]
mov eax, dword [0x46e200]
lea edx, [eax + eax*2]
mov eax, dword [0x46e20c]
lea edx, [eax + edx*2]
lea eax, [edx + ecx*2]
mov edx, dword [0x480ec4]
mov ecx, dword [0x46e1f8]
mov dword [esp + 0x28], eax
push edx
push 1
lea eax, [esp + 0x28]
push 0x14
push eax
mov dword [esp + 0x3c], ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [0x46e1fc]
mov edi, dword [0x46e20c]
and eax, 0xffff
add esp, 0x14
xor ebp, ebp
lea ecx, [eax + eax*4]
shl ecx, 3
lea edx, [ecx + 0x14]
lea ebx, [ecx + edi + 0x14]
mov ecx, dword [0x46e204]
mov dword [esp + 0x10], edx
lea eax, [ecx + eax*4 + 2]
lea edx, [eax + eax*4]
lea edi, [edi + edx*2]
mov dx, word [0x46e1fc]
cmp dx, si
jbe 0x414b52
mov esi, ebp
and esi, 0xffff
lea esi, [esi + esi*4]
shl esi, 3
mov eax, dword [esi + 0x46ba1c]
and eax, 0x80
cmp al, 0x80
je 0x414a94
mov ecx, dword [esi + 0x46ba08]
mov eax, dword [esp + 0x10]
neg ecx
sbb ecx, ecx
and ecx, eax
mov dword [esi + 0x46ba0c], ecx
jmp 0x414a9e
mov dword [esi + 0x46ba0c], 0
mov dx, word [esi + 0x46ba18]
neg dx
sbb edx, edx
and edx, ebx
mov dword [esi + 0x46ba10], edx
mov ax, word [esi + 0x46ba1a]
neg ax
sbb eax, eax
and eax, edi
mov dword [esi + 0x46ba14], eax
mov eax, dword [0x480e78]
test eax, eax
je 0x414ae6
mov edx, dword [0x46adf4]
lea ecx, [eax + eax*8]
mov dword [edx + ecx*2 + 8], edi
mov dword [0x480e78], 0
mov eax, dword [0x480ec4]
lea ecx, [esi + 0x46b9f8]
push eax
push 1
push 0x28
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
mov edx, dword [esi + 0x46ba1c]
add esp, 0x10
and edx, 0x80
cmp dl, 0x80
je 0x414b21
mov eax, dword [esi + 0x46ba08]
mov ecx, dword [esp + 0x10]
add ecx, eax
mov dword [esp + 0x10], ecx
xor eax, eax
mov ax, word [esi + 0x46ba18]
lea ecx, [eax + eax*4]
xor eax, eax
mov ax, word [esi + 0x46ba1a]
inc ebp
lea ebx, [ebx + ecx*2]
lea edx, [eax + eax*2]
lea edi, [edi + edx*2]
mov dx, word [0x46e1fc]
cmp bp, dx
jb 0x414a5f
xor esi, esi
xor edi, edi
cmp dx, si
jbe 0x414bc0
mov esi, edi
and esi, 0xffff
lea eax, [esi + esi*4]
shl eax, 3
mov ecx, dword [eax + 0x46ba08]
test ecx, ecx
je 0x414b95
mov edx, dword [eax + 0x46ba0c]
test edx, edx
je 0x414b95
mov eax, dword [0x480ec4]
push eax
push ecx
mov ecx, dword [esi*4 + 0x46b1f8]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
mov edx, dword [esi*4 + 0x46b1f8]
push edx
call dword [sym.imp.MSVCRT.dll_free]
mov dx, word [0x46e1fc]
add esp, 4
inc edi
mov dword [esi*4 + 0x46b1f8], 0
cmp di, dx
jb 0x414b59
xor esi, esi
xor ebp, ebp
cmp dx, si
mov dword [esp + 0x10], ebp
jbe 0x414c5d
mov eax, ebp
and eax, 0xffff
lea ebx, [eax + eax*4]
shl ebx, 3
cmp dword [ebx + 0x46ba1c], 0x200
je 0x414c4f
mov cx, word [ebx + 0x46ba18]
cmp cx, si
je 0x414c4f
lea eax, [eax + eax*2]
xor edi, edi
test cx, cx
mov esi, dword [eax*4 + 0x46a1e8]
mov dword [esp + 0x14], eax
jbe 0x414c42
mov eax, dword [0x480ec4]
push eax
push 1
push 0xa
push esi
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ebp, dword [esi + 0xc]
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0x14
inc edi
cmp di, word [ebx + 0x46ba18]
mov esi, ebp
jb 0x414c09
mov dx, word [0x46e1fc]
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x10]
mov dword [eax*4 + 0x46a1e8], 0
xor esi, esi
inc ebp
cmp bp, dx
mov dword [esp + 0x10], ebp
jb 0x414bcf
xor edi, edi
cmp dx, si
mov dword [esp + 0x10], edi
jbe 0x414d09
mov eax, edi
and eax, 0xffff
lea ebp, [eax + eax*4]
shl ebp, 3
test byte [ebp + 0x46ba1c], 0x20
je 0x414cfb
mov cx, word [ebp + 0x46ba1a]
xor ebx, ebx
cmp cx, si
je 0x414cf4
lea eax, [eax + eax*2]
test cx, cx
mov esi, dword [eax*4 + 0x4695e8]
mov dword [esp + 0x18], eax
jbe 0x414ce7
mov eax, ecx
and eax, 0xffff
mov ebx, eax
mov dword [esp + 0x14], eax
mov ecx, dword [0x480ec4]
push ecx
push 1
push 6
push esi
call dword [sym.imp.MSVCRT.dll_fwrite]
mov edi, dword [esi + 8]
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0x14
dec ebx
mov esi, edi
jne 0x414cb0
mov dx, word [0x46e1fc]
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
mov dword [eax*4 + 0x4695e8], 0
xor esi, esi
mov word [ebp + 0x46ba1a], bx
inc edi
cmp di, dx
mov dword [esp + 0x10], edi
jb 0x414c6c
xor edi, edi
cmp dx, si
jbe 0x414d69
mov ebx, dword [0x46adf4]
mov ecx, edi
and ecx, 0xffff
mov eax, dword [ecx*4 + 0x46b5f8]
cmp eax, esi
je 0x414d5c
cmp ebx, esi
je 0x414d5c
lea edx, [eax + eax*8]
lea eax, [ecx + ecx*4]
shl eax, 3
lea edx, [ebx + edx*2]
mov bx, word [eax + 0x46ba18]
mov word [edx + 4], bx
mov ax, word [eax + 0x46ba1a]
mov word [edx + 6], ax
mov ebx, dword [0x46adf4]
mov dx, word [0x46e1fc]
inc edi
mov dword [ecx*4 + 0x46b5f8], esi
cmp di, dx
jb 0x414d16
mov ecx, dword [esp + 0x24]
mov edx, dword [0x480ec4]
push esi
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, dword [0x46e1f8]
add esp, 0xc
cmp eax, esi
je 0x414e0e
test eax, eax
jbe 0x414dbc
xor edi, edi
mov eax, dword [0x480ec4]
mov ecx, dword [0x46adf4]
push eax
push 1
lea edx, [edi + ecx]
push 0x12
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [0x46e1f8]
add esp, 0x10
inc esi
add edi, 0x12
cmp esi, eax
jb 0x414d92
mov eax, dword [0x480ec4]
mov esi, dword [sym.imp.MSVCRT.dll_fwrite]
push eax
push 1
push 4
push 0x46e208
call esi
mov eax, dword [0x46e208]
add esp, 0x10
test eax, eax
je 0x414e0c
mov ecx, dword [0x480ec4]
mov edx, dword [0x46adec]
sub eax, 4
push ecx
push eax
add edx, 4
push 1
push edx
mov dword [0x46e208], eax
call esi
mov eax, dword [0x46adec]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0x14
xor esi, esi
mov ecx, dword [0x46adf4]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [0x46adf4], esi
mov dword [0x46e1f8], esi
mov dword [0x46e200], esi
mov dword [0x46e204], esi
mov dword [0x46e208], esi
mov dword [0x46e20c], esi
mov word [0x46e1fc], si
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret