Function at 0x401012
Capabilities:
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x798
mov esi, dword [esp + 0x7ac]
xor dword [0x4a892c], 0xff64fcd3
mov ecx, esi
call fcn.00409368
cmp eax, 0x807f
jb 0x401464
mov eax, dword [0x493fb4]
imul eax, eax, 0x9b945d5c
mov dword [0x493fb4], eax
mov ax, word [0x487430]
add eax, 0xffff9938
mov word [0x487430], ax
mov ax, word [0x48f63a]
mov eax, dword [0x498a6c]
lea ecx, [eax + 1]
mov dword [0x498a6c], ecx
imul eax, eax, 0x261c3fac
mov cx, word [0x4872e2]
and ecx, eax
mov word [0x4872e2], cx
lea ebp, [esp + 0x602]
push ebp
call fcn.00401f15
add esp, 4
mov edi, eax
mov ax, word [0x488b16]
cwde
or eax, 0x1279cc39
xor eax, 0xed8633c6
mov ecx, dword [0x4a184c]
imul ecx, eax
mov dword [0x4a184c], ecx
call fcn.0040b9c5
and al, 3
movzx eax, al
add eax, 7
lea ecx, [esp + edi + 0x602]
push eax
push ecx
call fcn.00412a0a
add esp, 8
mov ax, word [0x48c9de]
push 5
push 0x6a90
call fcn.00421632
add esp, 8
mov edi, eax
or dword [0x497984], 0x6ebfbbdf
push edi
push ebp
call fcn.0043d7f0
add esp, 8
mov ax, word [0x48aef8]
lea ecx, [eax + 1]
mov word [0x48aef8], cx
cwde
mov dword [0x4ac05c], eax
push 3
push 0x905f
call fcn.00421632
add esp, 8
mov ebx, eax
mov eax, dword [0x4991bc]
mov cx, word [0x48af9e]
movsx ecx, cx
imul ecx, eax
cmp ecx, 0xd42b1b3d
jg 0x401157
mov ax, word [0x48bc22]
and eax, 0xf508
mov word [0x48bc22], ax
push edi
push 5
call fcn.00413689
add esp, 8
mov dword [0x4a2994], 0xea6988d4
push ebx
push ebp
call fcn.0043faf9
add esp, 8
mov edi, eax
mov ax, word [0x486916]
lea ecx, [eax - 1]
mov word [0x486916], cx
cwde
mov cx, word [0x4893f6]
movsx ecx, cx
sar ecx, 6
sub eax, ecx
cmp eax, 0x60a8e3c8
je 0x4011e0
mov eax, dword [0x4a6f64]
xor eax, 0x4af5d380
mov ecx, dword [0x4a2624]
lea edx, [ecx + 1]
mov dword [0x4a2624], edx
mov edx, 0xa532c56a
sub edx, ecx
or edx, 0xacd31d1b
cmp eax, edx
je 0x4011e0
mov eax, dword [0x49de3c]
not eax
mov cx, word [0x488f54]
add ecx, eax
mov word [0x488f54], cx
push ebx
push 3
call fcn.00413689
add esp, 8
mov eax, dword [0x4aa5c4]
sar eax, 9
add eax, 0xe3c24228
mov ecx, dword [0x495b44]
lea edx, [ecx - 1]
mov dword [0x495b44], edx
and eax, ecx
or dword [0x4a1354], eax
test edi, edi
je 0x401419
mov ax, word [0x48d95e]
cwde
sar eax, 7
mov ecx, dword [0x4951ac]
imul ecx, eax
mov dword [0x4951ac], ecx
or dword [0x4943b4], 0xd3e6cfaa
mov ecx, esi
call fcn.00409368
mov ebx, eax
mov ecx, esi
call fcn.0041dfd8
push edi
push 1
push ebx
push eax
call fcn.004404e7
add esp, 0x10
mov ax, word [0x4871d4]
imul eax, eax, 0xffffca20
mov word [0x4871d4], ax
push edi
call fcn.004405cd
add esp, 4
mov eax, dword [0x49f4e4]
mov eax, dword [0x4a62cc]
mov ax, word [0x4868fe]
imul eax, eax, 0xffff8498
mov word [0x4868fe], ax
mov ecx, esi
call fcn.0042bdea
mov ax, word [0x48f67e]
cwde
imul eax, eax, 0xb1846
xor eax, 0x26bf2c5a
add dword [0x4a42f4], eax
mov byte [esp + 0x182], 0
mov dword [0x4a9044], 0x85a83332
mov eax, 0x182
lea edi, [esp]
push eax
push edi
push 0
call dword [0x48628c]
mov ax, word [0x48aa90]
cwde
xor eax, 0xf7ac478a
cmp eax, 0x82055969
jl 0x4012ee
and dword [0x4a2a38], 0xb9c67fdd
mov byte [esp + 0x601], 0
mov ax, word [0x4883d8]
or eax, 0x6a88
mov cx, word [0x48f5ee]
xor ecx, eax
mov word [0x48f5ee], cx
mov ebp, 0x15
push ebp
push 0x9468
call fcn.00421632
add esp, 8
mov esi, eax
add dword [0x49a764], 0x7e8592
lea ebx, [esp + 0x183]
push dword [0x4acf0c]
push dword [0x4acef4]
push edi
push esi
push ebx
call fcn.00409429
add esp, 0x14
mov eax, dword [0x4a12a4]
dec eax
mov dword [0x4a12a4], eax
mov ecx, dword [0x4a4f54]
sub ecx, eax
mov dword [0x4a4f54], ecx
push esi
push ebp
call fcn.00413689
add esp, 8
mov ax, word [0x49288e]
cwde
shl eax, 9
xor dword [0x497e80], eax
push dword [0x4acf0c]
call fcn.00403c8e
add esp, 4
mov eax, dword [0x494f64]
add eax, 0x590238bb
or dword [0x49f8c8], eax
push ebx
lea ebp, [esp + 0x606]
push ebp
call fcn.0042122d
add esp, 8
mov eax, dword [0x496058]
and dword [0x49ccb4], 0x77efc5dd
push 0x47f
push ebx
call fcn.00417091
add esp, 8
or dword [0x4a3fbc], 0xc08e1603
push 0x183
push edi
call fcn.00417091
add esp, 8
mov eax, dword [0x4a0064]
sar eax, 2
and dword [0x493c38], eax
push 0x16476
call dword [0x4862e8]
add dword [0x4a74f4], 0xd070c469
push ebp
call dword [0x486238]
add dword [0x4a7c4c], 0xeb507d4
mov ax, word [0x492798]
dec eax
mov word [0x492798], ax
mov ax, word [0x486432]
cwde
mov ecx, 0x4bebe015
sub ecx, eax
mov ax, word [0x48966a]
cwde
sar eax, 2
xor eax, ecx
add dword [0x49392c], eax
push 0x196
push ebp
call fcn.00417091
add esp, 8
mov eax, dword [0x498680]
imul eax, eax, 0xcf3fcc5a
mov dword [0x498680], eax
mov eax, dword [0x498530]
mov ecx, 0xa632a297
sub ecx, eax
or ecx, 0x8ae18a9c
and dword [0x4ac098], ecx
add esp, 0x798
pop esi
pop edi
pop ebx
pop ebp
ret