Function at 0x45aa60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push ebx
mov eax, 1
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov eax, 0x7fff
push esi
push edi
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x14], eax
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x8c], ebx
mov ecx, 6
lea edi, [ebp - 0x88]
rep stosd dword es:[edi], eax
push 0x10
stosw word es:[edi], ax
mov eax, dword [ebp + 8]
push 0x47ebe8
push eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x20], ebx
call dword [sym.imp.MSVCRT.dll__fsopen]
mov esi, eax
add esp, 0xc
cmp esi, ebx
mov dword [ebp - 0x44], esi
jne 0x45aaec
push 3
call fcn.0040c4d0
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
push 0x1e
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
call fcn.0045a280
mov edx, dword [0x49ec84]
mov edi, dword [sym.imp.MSVCRT.dll_fwrite]
movsx ecx, al
push esi
push ecx
mov byte [ebp - 0x76], al
mov eax, dword [edx + 0x15]
push 0x10
push eax
call edi
push 8
lea ecx, [ebp - 0x6c]
push 0x49eae4
push ecx
call sub.MSVCRT.dll_memcpy
push 8
lea edx, [ebp - 0x6c]
push edx
lea eax, [ebp - 0x94]
push eax
call sub.MSVCRT.dll_memcpy
lea ecx, [ebp - 0x24]
push ecx
mov eax, 0x7d00
push ebx
push 1
mov dword [ebp - 0x4c], ebx
mov word [ebp - 0xe], ax
mov word [ebp - 0x10], ax
call fcn.0044a5b0
add esp, 0x40
test eax, eax
je 0x45b012
mov ecx, dword [ebp - 0x24]
mov al, byte [ecx]
test al, al
jle 0x45afea
cmp al, 0x12
je 0x45afea
mov al, byte [ecx + 0x14]
test al, al
lea edi, [ecx + 0x14]
je 0x45afea
mov ecx, dword [0x49ec74]
mov dword [ebp - 4], ebx
movsx eax, byte [edi]
mov esi, dword [ecx + 0x15]
inc edi
dec eax
cmp eax, 0x2b
ja case.0x45aba5.15
xor edx, edx
mov dl, byte [eax + 0x45b100]
jmp dword [edx*4 + 0x45b0c4]
push 4
lea eax, [ebp - 0x1c]
push edi
push eax
call sub.MSVCRT.dll_memcpy
mov ecx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x1c]
add esp, 0xc
add edi, 4
cmp eax, ecx
jne 0x45abd2
cmp dword [ebp - 0x30], 1
jne 0x45afb4
push 4
lea edx, [ebp - 0x1c]
mov byte [esi], 1
push edx
inc esi
push esi
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 0x1c]
mov ecx, 5
add esp, 0xc
mov dword [ebp - 4], ecx
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x30], ebx
jmp 0x45afbb
movsx eax, byte [edi]
mov edx, dword [ebp - 0x50]
inc edi
cmp eax, edx
mov dword [ebp - 0x60], eax
je case.0x45aba5.15
mov byte [esi], 3
mov ecx, 2
mov byte [esi + 1], al
mov dword [ebp - 4], ecx
mov dword [ebp - 0x50], eax
jmp 0x45afbb
push 4
lea ecx, [ebp - 0x18]
push edi
push ecx
call sub.MSVCRT.dll_memcpy
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x18]
add esp, 0xc
add edi, 4
cmp eax, edx
jne 0x45ac49
cmp dword [ebp - 0x28], 1
jne 0x45afb4
push 4
lea eax, [ebp - 0x18]
mov byte [esi], 2
push eax
inc esi
push esi
call sub.MSVCRT.dll_memcpy
mov edx, dword [ebp - 0x18]
mov ecx, 5
add esp, 0xc
mov dword [ebp - 4], ecx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x28], ebx
jmp 0x45afbb
movsx eax, byte [edi]
mov dword [ebp - 8], eax
inc edi
jmp 0x45af91
mov byte [esi], 0x34
mov eax, dword [edi + 0xbd]
shl eax, 2
mov dword [ebp - 8], eax
add eax, 0xc1
push eax
inc esi
push edi
push esi
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 8]
mov ecx, dword [edi + eax + 0xc1]
lea edi, [edi + eax + 0xc1]
push ecx
lea eax, [esi + eax + 0xc1]
push edi
push eax
mov dword [ebp - 4], ecx
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
lea edx, [eax + ecx + 0xc2]
add esp, 0x18
add edi, eax
mov dword [ebp - 4], edx
jmp 0x45afb4
mov byte [esi], 0x2a
mov eax, dword [edi]
push eax
push edi
inc esi
push esi
mov dword [ebp - 4], eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 4]
add esp, 0xc
add edi, eax
inc eax
mov dword [ebp - 4], eax
jmp 0x45afb4
movsx eax, byte [edi]
mov dword [ebp - 8], eax
lea edi, [edi + eax*4 + 0x10f]
jmp case.0x45aba5.15
movsx eax, byte [edi]
mov dword [ebp - 8], eax
shl eax, 2
mov dword [ebp - 4], eax
mov byte [esi], 0x29
mov cl, byte [ebp - 8]
inc edi
inc esi
mov byte [esi], cl
mov edx, dword [ebp - 4]
push edx
push edi
inc esi
push esi
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 4]
add esp, 0xc
add edi, eax
add eax, 2
mov dword [ebp - 4], eax
jmp 0x45afb4
inc edi
jmp case.0x45aba5.15
mov byte [esi], 0x49
inc dword [ebp - 4]
mov eax, dword [edi + 0xbd]
shl eax, 2
mov dword [ebp - 8], eax
add eax, 0xc1
push eax
push edi
inc esi
push esi
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax + 0xc1]
add esp, 0xc
lea edi, [edi + eax + 0xc1]
mov dword [ebp - 4], edx
mov dword [ebp - 0x20], 1
jmp 0x45afb4
mov byte [esi], 0x4a
inc dword [ebp - 4]
mov dword [ebp - 0x20], ebx
jmp 0x45afb4
mov eax, dword [ebp - 0x40]
mov ecx, dword [edi + 0x18]
cmp ecx, eax
lea ebx, [edi + 0x18]
jne 0x45adae
cmp dword [ebp - 0x58], 1
jne 0x45add6
push 4
mov byte [esi], 4
inc esi
push ebx
push esi
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 4]
mov ecx, dword [ebx]
add esp, 0xc
add esi, 4
add eax, 5
mov dword [ebp - 0x40], ecx
mov dword [ebp - 4], eax
mov dword [ebp - 0x58], 0
mov edx, dword [ebp - 0x48]
mov eax, dword [edi + 0x1c]
cmp eax, edx
lea ebx, [edi + 0x1c]
jne 0x45ade9
cmp dword [ebp - 0x54], 1
jne 0x45ae11
push 4
mov byte [esi], 5
inc esi
push ebx
push esi
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebx]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 4]
add esp, 0xc
add esi, 4
add eax, 5
mov dword [ebp - 4], eax
mov dword [ebp - 0x54], 0
mov eax, dword [ebp - 0x2c]
mov byte [esi], 0x10
mov ecx, dword [edi + 0x21]
inc esi
mov dword [esi], ecx
add dword [ebp - 4], 5
movsx edx, byte [edi + 0x25]
add esi, 4
cmp edx, eax
je 0x45ae4c
mov byte [esi], 7
mov al, byte [edi + 0x25]
inc esi
mov byte [esi], al
movsx ecx, byte [edi + 0x25]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 4]
mov eax, 2
inc esi
add ecx, eax
mov dword [ebp - 4], ecx
jmp 0x45ae51
mov eax, 2
movsx edx, byte [edi + 0x20]
cmp edx, dword [ebp - 0x34]
je 0x45ae73
mov byte [esi], 8
mov cl, byte [edi + 0x20]
inc esi
mov byte [esi], cl
movsx edx, byte [edi + 0x20]
mov ecx, dword [ebp - 4]
inc esi
add ecx, eax
mov dword [ebp - 0x34], edx
mov dword [ebp - 4], ecx
movsx ecx, byte [edi + 0x75]
cmp ecx, dword [ebp - 0x14]
je 0x45ae95
mov byte [esi], 9
mov dl, byte [edi + 0x75]
inc esi
mov byte [esi], dl
movsx ecx, byte [edi + 0x75]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 4]
inc esi
add ecx, eax
mov dword [ebp - 4], ecx
lea edx, [ebp - 0x10]
push edx
lea eax, [edi]
push eax
lea ecx, [ebp - 8]
push ecx
push esi
call fcn.0045a980
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
add edx, eax
add esi, eax
mov dword [ebp - 4], edx
lea ebx, [edi + 0x26]
mov byte [esi], 0x28
push ebx
inc esi
call sub.MSVCRT.dll_strlen
inc eax
mov dword [ebp - 8], eax
mov byte [esi], al
inc esi
push ebx
push esi
call sub.MSVCRT.dll_strcpy
push esi
call fcn.004086f0
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
lea ecx, [edx + eax + 2]
add esp, 0x20
add edi, 0x76
mov dword [ebp - 4], ecx
xor ebx, ebx
jmp 0x45afb4
movsx eax, word [edi]
add edi, 2
cmp eax, 0xff
lea edx, [eax*4]
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
jg 0x45af14
mov byte [esi], 0x29
mov al, byte [ebp - 8]
inc esi
mov byte [esi], al
inc esi
jmp 0x45af22
mov byte [esi], 0x27
mov cx, word [ebp - 8]
inc esi
mov word [esi], cx
add esi, 2
mov edx, dword [ebp - 4]
push edx
push edi
push esi
call sub.MSVCRT.dll_memcpy
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x20]
add esp, 0xc
add esi, ecx
cmp eax, ebx
mov dword [ebp - 0x3c], ebx
jne 0x45af66
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x18]
jne 0x45af4c
cmp dword [ebp - 0x60], ebx
je 0x45af66
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
push ecx
lea edx, [ebp - 0x10]
push edx
push eax
push edi
lea ecx, [ebp - 0x3c]
push ecx
push esi
call fcn.0045a6b0
add esp, 0x18
mov eax, dword [ebp - 4]
mov esi, dword [ebp - 8]
xor edx, edx
add edi, eax
cmp esi, 0xff
mov esi, dword [ebp - 0x3c]
setg dl
add edx, 2
add edx, esi
add eax, edx
mov dword [ebp - 4], eax
jmp 0x45afb4
movsx eax, word [edi]
mov dword [ebp - 8], eax
add edi, 2
mov edx, dword [ebp - 0x14]
push edx
lea edx, [ebp - 0x10]
push edx
push eax
push edi
lea eax, [ebp - 4]
mov dword [ebp - 4], ebx
mov ecx, dword [ecx + 0x15]
push eax
push ecx
call fcn.0045a6b0
mov edx, dword [ebp - 8]
add esp, 0x18
lea edi, [edi + edx*4]
mov ecx, dword [ebp - 4]
cmp ecx, ebx
je 0x45afd5
mov eax, dword [ebp - 0x44]
push eax
push 1
push ecx
mov ecx, dword [0x49ec74]
mov edx, dword [ecx + 0x15]
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
mov ecx, dword [0x49ec74]
cmp byte [edi], 0
jne 0x45ab89
mov esi, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x24]
mov edi, dword [ecx + 1]
mov eax, dword [ebp - 0x4c]
lea ecx, [ebp - 0x24]
add eax, edi
push ecx
push eax
push 1
mov dword [ebp - 0x4c], eax
call fcn.0044a5b0
add esp, 0xc
test eax, eax
jne 0x45ab60
mov edi, dword [sym.imp.MSVCRT.dll_fwrite]
push esi
push 1
lea edx, [ebp - 9]
push 1
push edx
mov byte [ebp - 9], 0
call edi
mov eax, dword [0x479594]
push eax
mov dword [ebp - 0x8c], 0x2a269c
call fcn.00407a80
push 8
lea ecx, [ebp - 0x94]
push ecx
lea edx, [ebp - 0x86]
push edx
mov word [ebp - 0x88], ax
call sub.MSVCRT.dll_memcpy
push 8
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x7e]
push ecx
call sub.MSVCRT.dll_memcpy
mov edx, dword [ebp - 0x66]
sub edx, dword [ebp - 0x6a]
inc edx
push esi
mov byte [ebp - 0x71], 0
mov word [ebp - 0x70], dx
call dword [sym.imp.MSVCRT.dll_ftell]
sub eax, 0x1e
push esi
mov dword [ebp - 0x75], eax
call dword [sym.imp.MSVCRT.dll_rewind]
push esi
push 1
lea eax, [ebp - 0x8c]
push 0x1e
push eax
call edi
add esp, 0x44
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov esi, dword [ebp + 8]
push esi
push esi
call fcn.004386a0
push ebx
push esi
push 0x479850
call fcn.004120d0
add esp, 0x18
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret