Function at 0x505940
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x278
push ebx
push ebp
push esi
push edi
push str.teamid
lea ecx, [esp + 0x54]
call fcn.00418c70
lea eax, [esp + 0x1c]
push eax
push 0x1b1e0
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x78]
push edx
call fcn.005b7360
add esp, 0xc
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push str.players
lea eax, [esp + 0x5c]
push str.teamplayerlinks
push eax
call fcn.004908b0
mov ecx, eax
call fcn.005b8270
mov ecx, eax
call fcn.005bd530
mov ecx, eax
call fcn.005b89b0
mov ecx, eax
call fcn.005bdc80
lea ecx, [esp + 0x34]
call fcn.005bdce0
mov eax, dword [esp + 0x88]
lea ecx, [esp + 0x78]
cmp eax, ecx
je 0x5059e0
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
mov eax, dword [esp + 0x68]
lea ecx, [esp + 0x58]
cmp eax, ecx
mov ebp, 0x84760c
mov dword [esp + 0x6c], ebp
je 0x505a04
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
mov ecx, dword [esp + 0x1c]
push str.position
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x2c], str.position
mov dword [esp + 0x30], 1
call fcn.004e6cb0
mov ecx, dword [esp + 0x1c]
call fcn.005b6c70
mov ebx, eax
xor esi, esi
or eax, 0xffffffff
test ebx, ebx
mov ecx, 0x1e
lea edi, [esp + 0x198]
mov dword [esp + 0x14], esi
rep stosd dword es:[edi], eax
jle 0x505b0a
cmp esi, 0x1e
jge 0x505b0a
push esi
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x24]
call fcn.005b6e00
push str.position
lea ecx, [esp + 0x28]
call fcn.00419060
mov edi, eax
mov eax, dword [esp + 0x30]
test eax, eax
mov dword [esp + esi*4 + 0x198], edi
je 0x505aa5
dec dword [eax]
cmp dword [eax], 0
mov ebp, eax
jne 0x505aa5
test ebp, ebp
je 0x505aa5
mov ecx, ebp
call fcn.005b0ba0
push ebp
call fcn.005b3b10
add esp, 4
cmp edi, 0x20
jl 0x505af3
mov ecx, dword [esp + 0x1c]
push esi
lea edx, [esp + 0x38]
push edx
call fcn.005b6e00
push str.preferredposition1
lea ecx, [esp + 0x38]
call fcn.00419060
mov dword [esp + esi*4 + 0x198], eax
mov eax, dword [esp + 0x40]
test eax, eax
je 0x505af3
dec dword [eax]
cmp dword [eax], 0
mov edi, eax
jne 0x505af3
test edi, edi
je 0x505af3
mov ecx, edi
call fcn.005b0ba0
push edi
call fcn.005b3b10
add esp, 4
mov edx, dword [esp + 0x14]
inc edx
inc esi
cmp esi, ebx
mov dword [esp + 0x14], edx
mov ebp, 0x84760c
jl 0x505a51
mov esi, dword [esp + 0x14]
push str.teamid
lea ecx, [esp + 0x54]
call fcn.00418c70
push 0x1b1e0
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x74]
push ecx
call fcn.005b7360
add esp, 0xc
push eax
lea edx, [esp + 0x38]
push str.teamplayerlinks
push edx
call fcn.004908b0
mov ecx, eax
call fcn.005b8270
mov ecx, eax
call fcn.005b89b0
mov ecx, eax
call fcn.005bdfb0
lea ecx, [esp + 0x34]
call fcn.005bdce0
mov eax, dword [esp + 0x88]
lea ecx, [esp + 0x78]
cmp eax, ecx
je 0x505b7f
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
mov eax, dword [esp + 0x68]
lea ecx, [esp + 0x58]
cmp eax, ecx
mov dword [esp + 0x6c], ebp
je 0x505b9e
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
or eax, 0xffffffff
mov ecx, 0x1e
lea edi, [esp + 0x210]
rep stosd dword es:[edi], eax
push str.internationalreputation
lea ecx, [esp + 0x94]
call fcn.00418c70
push str.teamid
lea ecx, [esp + 0x54]
call fcn.00418c70
lea eax, [esp + 0x18]
push eax
push 4
lea ecx, [esp + 0x98]
push ecx
lea edx, [esp + 0xb8]
push edx
call fcn.005b7510
add esp, 0xc
push eax
push 0x1b265
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x7c]
push ecx
call fcn.005b74b0
add esp, 0xc
push eax
lea edx, [esp + 0x30]
push edx
call fcn.005b7fa0
add esp, 0xc
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push str.players
lea eax, [esp + 0x5c]
push str.teamplayerlinks
push eax
call fcn.004908b0
mov ecx, eax
call fcn.005b8270
mov ecx, eax
call fcn.005bd530
mov ecx, eax
call fcn.005b89b0
mov ecx, eax
call fcn.005bdc80
lea ecx, [esp + 0x34]
call fcn.005bdce0
mov ecx, dword [esp + 0x2c]
test ecx, ecx
mov dword [esp + 0x24], 0x8477e8
je 0x505c72
mov edx, dword [ecx]
push 1
call dword [edx + 0xc]
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x505c81
mov eax, dword [ecx]
push 1
call dword [eax + 0xc]
mov eax, dword [esp + 0x88]
lea ecx, [esp + 0x78]
cmp eax, ecx
mov dword [esp + 0x24], ebp
je 0x505ca3
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
mov eax, dword [esp + 0x68]
lea ecx, [esp + 0x58]
cmp eax, ecx
mov dword [esp + 0x6c], ebp
je 0x505cc2
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
mov eax, dword [esp + 0xc8]
lea ecx, [esp + 0xb8]
cmp eax, ecx
je 0x505ce3
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
mov eax, dword [esp + 0xa8]
lea ecx, [esp + 0x98]
cmp eax, ecx
mov dword [esp + 0xac], ebp
je 0x505d0b
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
mov ecx, dword [esp + 0x18]
call fcn.005b6c70
mov ecx, dword [esp + 0x18]
mov edi, eax
push 0x84fdac
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x3c], 0x84fdac
mov dword [esp + 0x40], 0xffffffff
call fcn.004e6cb0
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x34], eax
jmp 0x505d50
xor ebp, ebp
test edi, edi
jle 0x505e8f
lea ebx, [ebx]
xor ebx, ebx
test esi, esi
jle 0x505e76
lea ebx, [ebx]
push ebp
lea ecx, [esp + 0x94]
push ecx
mov ecx, dword [esp + 0x20]
call fcn.005b6e00
push str.preferredposition1
lea ecx, [esp + 0x94]
call fcn.00419060
mov edi, eax
mov eax, dword [esp + 0x9c]
test eax, eax
je 0x505dbd
dec dword [eax]
cmp dword [eax], 0
mov esi, eax
jne 0x505dbd
test esi, esi
je 0x505dbd
mov ecx, esi
call fcn.005b0ba0
push esi
call fcn.005b3b10
add esp, 4
cmp dword [esp + ebx*4 + 0x210], 0xffffffff
jne 0x506263
mov edx, dword [esp + ebx*4 + 0x198]
push edx
call fcn.004a3560
push edi
mov esi, eax
call fcn.004a3560
add esp, 8
cmp eax, esi
jne 0x506263
cmp dword [esp + 0x34], 1
jge 0x505e08
call fcn.0060fae0
cdq
mov ecx, 0x64
idiv ecx
cmp edx, 0x32
jle 0x506263
mov ecx, dword [esp + 0x18]
push ebp
lea edx, [esp + 0x54]
push edx
call fcn.005b6e00
push str.playerid
lea ecx, [esp + 0x54]
call fcn.00419060
mov edi, eax
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x505e4c
dec dword [eax]
cmp dword [eax], 0
mov esi, eax
jne 0x505e4c
test esi, esi
je 0x505e4c
mov ecx, esi
call fcn.005b0ba0
push esi
call fcn.005b3b10
add esp, 4
xor eax, eax
mov edi, edi
cmp dword [esp + eax*4 + 0x210], edi
je 0x506263
mov ecx, dword [esp + 0x14]
inc eax
cmp eax, ecx
jl 0x505e50
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + ebx*4 + 0x210], edi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
cmp eax, esi
je 0x505ea5
mov edi, dword [esp + 0x24]
inc ebp
cmp ebp, edi
jl 0x505d60
cmp eax, esi
je 0x505ea5
mov ecx, dword [esp + 0x34]
inc ecx
cmp ecx, 2
mov dword [esp + 0x34], ecx
jl 0x505d50
mov eax, dword [esp + 0x14]
xor esi, esi
test eax, eax
jle 0x5060f4
mov ebx, 0x84f9cc
cmp esi, 0xb
jl 0x505ec8
mov dword [esp + esi*4 + 0x198], 0x20
push str.jerseynumber
lea ecx, [esp + 0x70]
call fcn.00418c70
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0xf4]
call fcn.005b7e80
lea edi, [esi + 1]
xor ebp, ebp
push str.position
lea ecx, [esp + 0x38]
mov dword [esp + 0x130], edi
mov dword [esp + 0x134], ebp
mov dword [esp + 0xf4], ebx
call fcn.00418c70
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0xb0]
call fcn.005b7e80
mov edx, dword [esp + esi*4 + 0x198]
push 0x1b1e0
push str.teamid
lea ecx, [esp + 0x13c]
mov dword [esp + 0xf0], edx
mov dword [esp + 0xf4], ebp
mov dword [esp + 0xb4], ebx
call fcn.00454040
mov eax, dword [esp + esi*4 + 0x210]
push eax
push 1
lea ecx, [esp + 0x13c]
call fcn.005b3e10
push str.playerid
lea ecx, [esp + 0x94]
call fcn.00418c70
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x164]
call fcn.00453550
mov eax, dword [esp + 0xa8]
lea edx, [esp + 0x98]
cmp eax, edx
je 0x505fae
mov ecx, dword [0x9d9dcc]
mov ecx, dword [ecx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
lea eax, [esp + 0x134]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.004908b0
mov ecx, eax
call fcn.005b82c0
mov edx, dword [eax + 4]
push str.teamplayerlinks
mov byte [eax + 8], 1
mov eax, dword [eax]
push edx
push eax
lea ecx, [esp + 0x5c]
call fcn.005b3b30
push 0x8c2134
push 0x8c2134
push 0x8c2134
push 0x8c2134
push 0x8c2134
push 0x8c2134
push 0x8c2134
push 0x8c2134
lea ecx, [esp + 0x110]
push ecx
lea edx, [esp + 0xd0]
push edx
lea ecx, [esp + 0x78]
call fcn.005b3b70
lea ecx, [esp + 0x50]
call fcn.005b3d30
lea esi, [esp + 0x1b0]
mov ebp, 3
mov eax, dword [esi - 0x1c]
sub esi, 0x1c
lea ecx, [esi - 0x10]
cmp eax, ecx
je 0x506052
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
dec ebp
jne 0x506036
mov eax, dword [esp + 0xc8]
lea ecx, [esp + 0xb8]
cmp eax, ecx
je 0x506076
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
mov eax, dword [esp + 0x4c]
lea ecx, [esp + 0x3c]
cmp eax, ecx
mov dword [esp + 0xac], 0x84f900
je 0x50609c
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
mov eax, dword [esp + 0x10c]
lea ecx, [esp + 0xfc]
cmp eax, ecx
je 0x5060bd
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
mov eax, dword [esp + 0x84]
lea ecx, [esp + 0x74]
cmp eax, ecx
mov dword [esp + 0xf0], 0x84f900
je 0x5060e6
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
mov eax, dword [esp + 0x14]
mov esi, edi
cmp esi, eax
jl 0x505eb8
push str.teamid
lea ecx, [esp + 0x70]
call fcn.00418c70
push 0x1b1e0
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0xb4]
push ecx
call fcn.005b7360
add esp, 0xc
push eax
lea edx, [esp + 0x28]
push str.teams
push edx
call fcn.004908b0
mov ecx, eax
call fcn.005b8270
mov ecx, eax
call fcn.005b89b0
mov ecx, eax
call fcn.005bc6d0
lea ecx, [esp + 0x24]
mov esi, eax
call fcn.005bdce0
mov eax, dword [esp + 0xc8]
lea ecx, [esp + 0xb8]
cmp eax, ecx
je 0x50616d
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
mov eax, dword [esp + 0x84]
lea ecx, [esp + 0x74]
cmp eax, ecx
mov dword [esp + 0xac], 0x84760c
je 0x506196
mov edx, dword [0x9d9dcc]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
test esi, esi
je 0x5061bb
push 0x1b1e0
call fcn.00615ea0
push 0x1b1e0
call fcn.00616790
push 0x1b1e0
call fcn.006157d0
add esp, 0xc
mov eax, dword [esp + 0x18]
test eax, eax
je 0x50620b
dec dword [eax]
cmp dword [eax], 0
mov edi, eax
jne 0x50620b
test edi, edi
je 0x50620b
mov esi, dword [edi + 0x5c]
test esi, esi
je 0x5061ef
dec dword [esi]
jne 0x5061ef
test esi, esi
je 0x5061ef
mov ecx, esi
call fcn.005b0ba0
push esi
call fcn.005b3b10
add esp, 4
mov eax, dword [edi + 0x58]
lea ecx, [edi + 0x54]
cmp eax, ecx
je 0x506202
push eax
call fcn.005b3b10
add esp, 4
push edi
call fcn.005b3b10
add esp, 4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x50625b
dec dword [eax]
cmp dword [eax], 0
mov edi, eax
jne 0x50625b
test edi, edi
je 0x50625b
mov esi, dword [edi + 0x5c]
test esi, esi
je 0x50623f
dec dword [esi]
jne 0x50623f
test esi, esi
je 0x50623f
mov ecx, esi
call fcn.005b0ba0
push esi
call fcn.005b3b10
add esp, 4
mov eax, dword [edi + 0x58]
lea edx, [edi + 0x54]
cmp eax, edx
je 0x506252
push eax
call fcn.005b3b10
add esp, 4
push edi
call fcn.005b3b10
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x14]
inc ebx
cmp ebx, eax
jl 0x505d70
jmp 0x505e76