Function at 0x531a50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi + 0x7590]
lea eax, [eax + eax*2]
shl eax, 1
add eax, 3
and al, 0xfc
call fcn.005322e0
mov al, byte [esi + 0x14]
mov ebx, esp
push eax
call fcn.0052bf80
mov cl, byte [esi + 0x15]
shl eax, 4
push ecx
mov dword [ebp + 8], eax
call fcn.0052bf80
mov edx, dword [ebp + 8]
add edx, eax
mov al, byte [esi + 0x16]
push eax
mov dword [ebp - 0x14], edx
call fcn.0052bf80
mov cl, byte [esi + 0x17]
shl eax, 4
push ecx
mov dword [ebp + 8], eax
call fcn.0052bf80
mov edx, dword [ebp + 8]
add edx, eax
mov al, byte [esi + 0x18]
push eax
mov dword [ebp - 0xc], edx
call fcn.0052bf80
mov cl, byte [esi + 0x19]
shl eax, 4
push ecx
mov dword [ebp + 8], eax
call fcn.0052bf80
mov edx, dword [ebp + 8]
add edx, eax
mov al, byte [esi + 0x1e]
push eax
mov dword [ebp - 0x18], edx
call fcn.0052bf80
mov cl, byte [esi + 0x1f]
shl eax, 4
push ecx
mov dword [ebp + 8], eax
call fcn.0052bf80
mov edx, dword [ebp + 8]
add edx, eax
mov al, byte [esi + 0x20]
push eax
mov dword [ebp - 0x1c], edx
call fcn.0052bf80
mov cl, byte [esi + 0x21]
shl eax, 4
push ecx
mov dword [ebp + 8], eax
call fcn.0052bf80
mov edx, dword [ebp + 8]
add edx, eax
mov al, byte [esi + 0x22]
push eax
mov dword [ebp - 0x10], edx
call fcn.0052bf80
mov cl, byte [esi + 0x23]
shl eax, 4
push ecx
mov dword [ebp + 8], eax
call fcn.0052bf80
mov edx, dword [ebp + 8]
add esp, 0x30
add edx, eax
mov byte [ebp - 0xa0], 0xa
mov dword [ebp - 0x20], edx
mov byte [ebp - 0x9f], 5
mov byte [ebp - 0x9e], 1
mov dx, word [esi + 0x7590]
mov cx, word [esi + 0x7594]
xor eax, eax
dec cx
mov word [ebp - 0x9c], ax
mov word [ebp - 0x9a], ax
lea eax, [edx - 1]
mov word [ebp - 0x96], cx
mov word [ebp - 0x98], ax
mov eax, 0x12c
mov word [ebp - 0x94], ax
mov word [ebp - 0x92], ax
mov ecx, 0xc
xor eax, eax
lea edi, [ebp - 0x90]
mov byte [ebp - 0x9d], 8
rep stosd dword es:[edi], eax
mov byte [ebp - 0x60], al
mov eax, dword [esi + 0x7590]
and eax, 0x80000001
mov byte [ebp - 0x5f], 3
jns 0x531bc1
dec eax
or eax, 0xfffffffe
inc eax
je 0x531bca
inc edx
mov word [ebp - 0x5e], dx
jmp 0x531bd5
mov cx, word [esi + 0x7590]
mov word [ebp - 0x5e], cx
xor eax, eax
mov ecx, 0xd
lea edi, [ebp - 0x56]
mov word [ebp - 0x5c], 1
mov word [ebp - 0x5a], ax
mov word [ebp - 0x58], ax
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
test byte [esi + 0x10], 8
je 0x531ca8
mov edx, dword [sym.imp.MSVCRT.dll_strncmp]
push 0x8000
push edx
call sub.MSVCRT.dll__setmode
add esp, 8
cmp eax, 0xffffffff
jne 0x531c38
lea edi, [esi + 0x7528]
mov ecx, 7
mov esi, str.620:_Cant_open_output_file
mov eax, 0xa
rep movsd dword es:[edi], dword [esi]
lea esp, [ebp - 0xac]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp + 8], sym.imp.MSVCRT.dll__setjmp3
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0xa0]
pushal
invalid
invalid
call dword [ecx + 0x6a]
add dword [eax - 0x80], ebp
add byte [eax], al
add byte [edx - 0x18], dl
push es
push es
add byte [eax], al
mov eax, dword [esi + 0x7594]
add esp, 0x10
xor edx, edx
test eax, eax
mov dword [ebp - 8], edx
jle 0x531dce
mov dword [ebp - 4], 0
mov eax, dword [esi + 0x7590]
xor ecx, ecx
test eax, eax
jle 0x531d2b
mov edi, dword [ebp - 4]
sub edi, 0
je 0x531d05
dec edi
je 0x531ced
dec edi
jne 0x531d1c
imul eax, edx
mov edi, dword [ebp + 0xc]
add eax, ecx
cmp byte [eax + edi], 0x31
jne 0x531ce8
mov al, byte [ebp - 0x18]
jmp 0x531d19
lea eax, [esi + 0x28]
push 0x58518c
push eax
call sub.MSVCRT.dll_fopen
add esp, 8
mov dword [ebp + 8], eax
test eax, eax
jne 0x531c3f
lea edi, [esi + 0x7528]
mov ecx, 7
mov esi, str.621:_Cant_open_output_file
mov eax, 0xa
rep movsd dword es:[edi], dword [esi]
lea esp, [ebp - 0xac]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 0x20]
jmp 0x531d19
imul eax, edx
mov edi, dword [ebp + 0xc]
add eax, ecx
cmp byte [eax + edi], 0x31
jne 0x531d00
mov al, byte [ebp - 0xc]
jmp 0x531d19
mov al, byte [ebp - 0x10]
jmp 0x531d19
imul eax, edx
mov edi, dword [ebp + 0xc]
add eax, ecx
cmp byte [eax + edi], 0x31
mov al, byte [ebp - 0x14]
je 0x531d19
mov al, byte [ebp - 0x1c]
mov byte [ecx + ebx], al
mov eax, dword [esi + 0x7590]
inc ecx
cmp ecx, eax
jl 0x531c83
mov ecx, dword [esi + 0x7590]
mov eax, 1
cmp ecx, eax
mov edi, eax
jle 0x531dac
mov cl, byte [ebx + edi - 1]
cmp cl, byte [ebx + edi]
jne 0x531d4d
cmp eax, 0x3f
jge 0x531d4d
inc eax
jmp 0x531d77
mov edx, dword [ebp + 8]
add eax, 0xc0
push edx
push eax
call sub.MSVCRT.dll_fputc
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [ebx + edi - 1]
push eax
push ecx
call sub.MSVCRT.dll_fputc
mov edx, dword [ebp - 8]
add esp, 0x10
mov eax, 1
mov ecx, dword [esi + 0x7590]
inc edi
cmp edi, ecx
jl 0x531d3c
cmp eax, 1
jle 0x531dac
mov edx, dword [ebp + 8]
add eax, 0xc0
push edx
push eax
call sub.MSVCRT.dll_fputc
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [ebx + edi - 1]
push eax
push ecx
call sub.MSVCRT.dll_fputc
mov edx, dword [ebp - 8]
add esp, 0x10
mov eax, dword [ebp - 4]
inc eax
cmp eax, 3
mov dword [ebp - 4], eax
jl 0x531c73
mov eax, dword [esi + 0x7594]
inc edx
cmp edx, eax
mov dword [ebp - 8], edx
jl 0x531c6c
mov edx, dword [ebp + 8]
push edx
call sub.MSVCRT.dll_fclose
add esp, 4
xor eax, eax
lea esp, [ebp - 0xac]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret